home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / PInterfaces / ENET.p < prev    next >
Encoding:
Text File  |  1992-01-29  |  2.7 KB  |  92 lines  |  [TEXT/MPS ]

  1.  
  2. {
  3. Created: Sunday, September 15, 1991 at 10:23 PM
  4.  ENET.p
  5.  Pascal Interface to the Macintosh Libraries
  6.  
  7.   Copyright Apple Computer, Inc. 1990-1991
  8.   All rights reserved
  9. }
  10.  
  11.  
  12. {$IFC UNDEFINED UsingIncludes}
  13. {$SETC UsingIncludes := 0}
  14. {$ENDC}
  15.  
  16. {$IFC NOT UsingIncludes}
  17.  UNIT ENET;
  18.  INTERFACE
  19. {$ENDC}
  20.  
  21. {$IFC UNDEFINED UsingENET}
  22. {$SETC UsingENET := 1}
  23.  
  24. {$I+}
  25. {$SETC ENETIncludes := UsingIncludes}
  26. {$SETC UsingIncludes := 1}
  27. {$IFC UNDEFINED UsingTypes}
  28. {$I $$Shell(PInterfaces)Types.p}
  29. {$ENDC}
  30. {$IFC UNDEFINED UsingOSUtils}
  31. {$I $$Shell(PInterfaces)OSUtils.p}
  32. {$ENDC}
  33. {$SETC UsingIncludes := ENETIncludes}
  34.  
  35. CONST
  36. ENetSetGeneral = 253;                        {Set "general" mode}
  37. ENetGetInfo = 252;                            {Get info}
  38. ENetRdCancel = 251;                            {Cancel read}
  39. ENetRead = 250;                                {Read}
  40. ENetWrite = 249;                            {Write}
  41. ENetDetachPH = 248;                            {Detach protocol handler}
  42. ENetAttachPH = 247;                            {Attach protocol handler}
  43. ENetAddMulti = 246;                            {Add a multicast address}
  44. ENetDelMulti = 245;                            {Delete a multicast address}
  45.  
  46. eLenErr = -92;                                {Length error ddpLenErr}
  47. eMultiErr = -91;                            {Multicast address error ddpSktErr}
  48.  
  49. EAddrRType = 'eadr';                        {Alternate address resource type}
  50.  
  51. TYPE
  52. EParamBlkPtr = ^EParamBlock;
  53. EParamBlock = PACKED RECORD
  54.  qLink: QElemPtr;                            {next queue entry}
  55.  qType: INTEGER;                             {queue type}
  56.  ioTrap: INTEGER;                            {routine trap}
  57.  ioCmdAddr: Ptr;                             {routine address}
  58.  ioCompletion: ProcPtr;                       {completion routine}
  59.  ioResult: OSErr;                            {result code}
  60.  ioNamePtr: StringPtr;                       {->filename}
  61.  ioVRefNum: INTEGER;                        {volume reference or drive number}
  62.  ioRefNum: INTEGER;                            {driver reference number}
  63.  csCode: INTEGER;                            {call command code AUTOMATICALLY set}
  64.  CASE INTEGER OF
  65.    ENetWrite,ENetAttachPH,ENetDetachPH,ENetRead,ENetRdCancel,ENetGetInfo,ENetSetGeneral:
  66.   (eProtType: INTEGER;                      {Ethernet protocol type}
  67.   ePointer: Ptr;
  68.   eBuffSize: INTEGER;                       {buffer size}
  69.   eDataSize: INTEGER);                       {number of bytes read}
  70.    ENetAddMulti,ENetDelMulti:
  71.   (eMultiAddr: ARRAY [0..5] of char);       {Multicast Address}
  72.  END;
  73.  
  74.  
  75. FUNCTION EWrite(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  76. FUNCTION EAttachPH(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  77. FUNCTION EDetachPH(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  78. FUNCTION ERead(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  79. FUNCTION ERdCancel(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  80. FUNCTION EGetInfo(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  81. FUNCTION ESetGeneral(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  82. FUNCTION EAddMulti(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  83. FUNCTION EDelMulti(thePBptr: EParamBlkPtr;async: BOOLEAN): OSErr;
  84.  
  85.  
  86. {$ENDC} { UsingENET }
  87.  
  88. {$IFC NOT UsingIncludes}
  89.  END.
  90. {$ENDC}
  91.  
  92.